package com.github.yealove.configgen.service.impl;

import com.github.yealove.configgen.mapper.GroupMapper;
import com.github.yealove.configgen.model.Group;
import com.github.yealove.configgen.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupServiceImpl implements GroupService {
    @Autowired
    private GroupMapper groupMapper;

    @Override
    public List<Group> getAllGroup() {
        return groupMapper.getAllGroup();
    }

    @Override
    public void addGroup(String name) {
        groupMapper.addGroup(name);
    }

    @Override
    public Group getGroupById(int gId) {
        return groupMapper.getGroupById(gId);
    }
}
